package BlindCounters;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Timer;

public abstract class BlindCounter implements ActionListener{

	public abstract int getBigBlindSize();
	public abstract int getSmallBlindSize();
	protected abstract void increaseBlindSize();
	
	
	private Timer blindTimer;
	private int blindLevel;
	private int blindIncreaseTime;
	
	BlindCounter(int blindIncreaseTime){		
		this.blindTimer = new Timer(blindIncreaseTime*1000, this);
		this.blindLevel = 1;
	}
	
	public void startBlindTimer(){
		this.blindTimer.start();
	}
	
	public void stopBlindTimer(){
		this.blindTimer.stop();
	}

	@Override
	public void actionPerformed(ActionEvent arg0) {
		// Received an event, this indicates it is time to increase the blinds
		this.increaseBlindSize();
		blindLevel++;
	}
}
